﻿import QtQuick 2.0

import "../components"



// 暂停后需要输入浓度值
CustomPopupBox {

    id: root

    signal accepted()

    height: 260*dp; width: 360*dp


    onVisibleChanged: {
        edit_conc.redBorder = false
        edit_conc.setText("")
    }


    contentItem: Item{
        CustomInputText{
            id: edit_conc
            title: "浓度值"
            y: 20*dp
            anchors.horizontalCenter: parent.horizontalCenter
            editWidth: 200*dp
        }
        Row{
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.bottom: parent.bottom
            anchors.bottomMargin: 30*dp
            spacing: 15*dp
            CustomButton{
                defaultMode2: true
                title: "取消"
                onClicked: {
                    root.close()
                }
            }CustomButton{
                defaultMode1: true
                title: "确定"
                onClicked: {
                    if(edit_conc.getText() !== ""){
                        gStateExp.hoJianConc = edit_conc.getText()
                        root.accepted()
                        root.close()
                        gPauseNeedPassword = false
                    }else{
                        edit_conc.redBorder = true
                        edit_conc.redInfo = "请输入浓度值"
                    }
                }
            }
        }
    }


}
